//
//  PpAttentionViewController.swift
//  Palmpilot
//
//  Created by 杨伟毅 on 2018/10/22.
//  Copyright © 2018年 杨伟毅. All rights reserved.
//

import UIKit

class PpAttentionViewController: PpBaseViewController,UITableViewDataSource,UITableViewDelegate {
    let matterTableViews = UITableView.init(frame: ZCGRECT(x: 0, y: 0, width: SCREEN_width, height: SCREEN_HEIGHT-TopHeight))
    
    override func viewWillAppear(_ animated: Bool) {
        super.viewWillAppear(animated)
        self.title = PpLanguageSwitchTool.getString(key: "Matters needing attention")
    }
    override func viewDidLoad() {
        super.viewDidLoad()
        matterTableViews.delegate = self
        matterTableViews.dataSource = self
        matterTableViews.estimatedRowHeight = 120
        matterTableViews.register(UINib.init(nibName: "PpWearFirstTableViewCell", bundle: Bundle.main), forCellReuseIdentifier: "PpWearFirstTableViewCell")
        matterTableViews.separatorStyle = .none
        matterTableViews.tableFooterView = UIView()
        PpBaseTool.insetTableViewAndUIViewController(baseView: matterTableViews, baseVC: self)
        self.view.addSubview(matterTableViews)
        // Do any additional setup after loading the view.
    }
    func numberOfSections(in tableView: UITableView) -> Int {
        return 1
    }
    
    func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
        return 1
    }
    
    func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat {
        return UITableViewAutomaticDimension
    }
    func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
        let baseCell:PpWearFirstTableViewCell = tableView.dequeueReusableCell(withIdentifier: "PpWearFirstTableViewCell") as! PpWearFirstTableViewCell
        baseCell.titlelabel.isHidden = true
        baseCell.comtentLabel.text = PpLanguageSwitchTool.getString(key: "MattersTips")
        baseCell.selectionStyle  = .none
        return baseCell
    }

    override func didReceiveMemoryWarning() {
        super.didReceiveMemoryWarning()
        // Dispose of any resources that can be recreated.
    }
    

    /*
    // MARK: - Navigation

    // In a storyboard-based application, you will often want to do a little preparation before navigation
    override func prepare(for segue: UIStoryboardSegue, sender: Any?) {
        // Get the new view controller using segue.destinationViewController.
        // Pass the selected object to the new view controller.
    }
    */

}
